package main

import "fmt"

type A struct {
	x, y int
}

func main() {
	var t interface{}
	a := A{1, 2}
	t = a
	var a1 A
	// a1 = t  // cannot use t (type interface {}) as type A in assignment: need type assertion
	a1 = t.(A) // 类型断言，判断t 是否是A类型变量，如果是则赋值给a1,否则panic
	fmt.Printf("%T\n", a1)
}
